package com.kaver.modular.system.dao;

import com.kaver.modular.system.model.DcApp;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.mapper.BaseMapper;

/**
 * <p>
 * 应用 Mapper 接口
 * </p>
 *
 * @author Roc
 * @since 2019-01-29
 */
public interface DcAppMapper extends BaseMapper<DcApp> {
	@Select("SELECT A.id as id,A.app_name as appName,A.app_desc as AppDesc,A.create_time as createTime,A.create_user as createUser,A.update_time as updateTime,A.update_user as updateUser FROM dc_app A LEFT JOIN dc_app_user B ON A.id = B.app_id WHERE B.user_id = #{userId} ")
	 List<DcApp> getUserApp(@Param("userId")Integer userId);
}
